<template>
  <!-- <div style="position: relative">
    <div style="position: sticky;top: 0;z-index: 999;padding-top: 20px;background-color: white;padding-bottom: 20px">
      <div class="table_Header">
        <el-row :gutter="24">


          <el-col :span="3">
            <div class="align_items">
              <span class="table_HeaderTitle">商品名称</span>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="align_items">
              <span class="table_HeaderTitle">货号</span>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="align_items">
              <span class="table_HeaderTitle">仓库</span>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="align_items">
              <span style="text-align: center" class="table_HeaderTitle">单位</span>
            </div>
          </el-col>
             <el-col :span="4">
            <div class="align_items">
              <span class="table_HeaderTitle">库存量</span>
            </div>
          </el-col>

          <el-col :span="4" >
            <div class="justify_right">
              <span class="table_HeaderTitle">操作</span>
            </div>
          </el-col>
        </el-row>
      </div>
    </div>
    <div class="table_List" v-for="item in shippingForm">
      <div class="table_ListHeader">

      </div>
      <div style="padding: 10px">
        <el-row :gutter="24">
          <el-col :span="3">
            <div style="display: flex;flex-direction: column;justify-content: center" class="shop_Height">
              <span class="table_ContentTitle">{{item.name}}</span>
            </div>
          </el-col>



          <el-col :span="4">
            <div class="align_items shop_Height">
              <span class="table_ContentTitle">{{item.sn}}</span>
            </div>
          </el-col>
          <el-col :span="4">
            <div class="align_items shop_Height">
              <span class="table_ContentTitle">{{item.shopName}}</span>
            </div>
          </el-col>

          <el-col :span="4">
            <div class="justify_left shop_Height">
              <span class="table_ContentTitle">{{item.unit}}</span>
            </div>
          </el-col>

            <el-col :span="4">
            <div class="align_items shop_Height">
              <span class="table_ContentTitle">{{item.quantity}}</span>
            </div>
          </el-col>

          <el-col :span="2" v-if="audited==0&&type==1">
            <div class="justify_right shop_Height" @click="detailsClick(item)">
              <a class="details_Title">审核</a>
            </div>
          </el-col>
          <el-col :span="2" v-if="audited==0&&type==1">
            <div class="justify_right shop_Height" @click="editClick(item)">
              <a class="details_Title">修改并审核</a>
            </div>
          </el-col>
          <el-col :span="4" v-if="audited==1&&type==1">
            <div class="justify_right shop_Height" @click="detailsClick(item)">
              <a class="details_Title">详情</a>
            </div>
          </el-col>
        </el-row>
      </div>
    </div>
  </div> -->
  <div>

   <el-table
      :data="shippingForm"
          border
      style="width: 100%">
      <el-table-column
      align="center"  header-align="center"
        prop="shopName"
        label="仓库"
        width="180">
      </el-table-column>
      <el-table-column
      align="center"  header-align="center"
        prop="name"
        label="商品名称"
        width="180">
      </el-table-column>
     <el-table-column
       align="center"  header-align="center"
       prop="sn"
       label="货号">
     </el-table-column>
     <el-table-column
       align="center"  header-align="center"
       prop="unit"
       label="单位">
     </el-table-column>
     <el-table-column
       align="center"  header-align="center"
       prop="quantity"
       label="当前库存">
     </el-table-column>
     <el-table-column
      align="center"  header-align="center"
        prop="inQuantity"
        label="入库数量">
      </el-table-column>
      <el-table-column
      align="center"  header-align="center"
        prop="outQuantity"
        label="出库数量">
      </el-table-column>
      <el-table-column
      align="center"  header-align="center"
        prop="backQuantity"
        label="回桶数量">
      </el-table-column>
      <el-table-column
      align="center"  header-align="center"
        label="查看详情">
        <template slot-scope="scope">
            <div class="shop_Height" @click="detailsClick(scope.row)">
              <a class="details_Title">查看详情</a>
            </div>
          </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
  export default {
    data() {
      return {}
    },
    props: [
      'shippingForm','shippingType',"audited",'type'
    ],
    methods: {
      detailsClick(id) {
          this.$emit('detailsClick', id)
      },
      editClick(item){
           this.$emit('editClick',item)
      }
    },
    filters: {

    },
  }
</script>

<style scoped>
  .table_Header {
    width: 100%;
    background-color: #f5f7fa;
    padding: 10px;
  }

  .table_HeaderTitle {
    font-size: 12px;
    color: #353535;
    font-weight: 600;
  }

  .table_List {
    width: 100%;
    margin-bottom: 20px;
    border: 1px solid #f2f2f2;
  }

  .table_ListHeader {
    width: 100%;
    padding: 10px;
    background-color: #f5f7fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .table_ListHeaderTitle {
    font-size: 12px;
    color: #888888;
  }

  .align_items {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .justify_left {
    display: flex;
    align-items: center;
  }

  .justify_right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .table_ContentTitle {
    font-size: 12px;
    color: #353535;
    width: 100%;
    text-align: center;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .shop_Height {
    min-height: 30px;
  }

  .details_Title {
    font-size: 14px;
    color: #409EFF;
  }
</style>
